home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!usenet
- From: GHouck <hksys@teleport.com>
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: Q:Hex to Decimal?
- Date: 13 Apr 1996 07:17:56 GMT
- Organization: systems hk
- Message-ID: <4knkf4$i9s@nadine.teleport.com>
- References: <316D2289.4759@tricon.net>
- NNTP-Posting-Host: ip-pdx14-40.teleport.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- Thomas A Cooper <tacooper@tricon.net> wrote:
- [snip]
- > I'm struggling with the reverse situation, a function to convert an
- >integer into a HEX string. Anybody got any ideas?? Thanks in advance for
- >your help.
- Tom,
-
- The easiest solution would be (in my judgement):
-
- sprintf( string,"%x",integervalue );
-
- (you can control width of output as well: e.g.: "%04x", etc)
-
- Yours, Geoff Houck
-
-
-